<?php use_helper('javascript');?>
	<div class="cTitle"><?php echo $cTitle; ?> :: 
	<?php echo link_to1('分类列表','category/index');?>  |  
	<?php echo link_to1('添加分类','category/create');?>
	</div>
	<div id="content">
	<br />
	共计<?php echo $count;?>个大分类
	<br />
    <table class="cList" width="99%" cellspacing="1" cellpadding="2" >
    <tr>
		<td width="10%" class="cFirst">编号</td>
		<td width="10%" class="cFirst">名称</td>
		<td width="10%" class="cFirst">是否显示</td>
		<td width="10%" class="cFirst">排序</td>
		<td width="30%" class="cFirst">操作</td>
    </tr>
	<?php if($categories):?>
	<?php foreach($categories as $cate):?>
	<tr>
		<td class="cSecond"><?php echo $cate->getId();?></td>
		<td class="cSecond"><?php echo $cate->getTitle();?></td>
		<td class="cSecond"><?php echo $cate->getIson()?'是':'否';?></td>
		<td class="cSecond"><?php echo $cate->getOrders();?></td>
		<td class="cSecond">
		<?php echo link_to1('编辑','category/edit?id='.$cate->getId());?> | 
		<?php echo link_to_remote('查看子分类',
		array( 'update'=>'cListTarget',
			   'url'=>'category/viewsub?id='.$cate->getId(),));
		?>
		<?php echo link_to1('添加子分类','category/create?fid='.$cate->getId());?>
		</td>
    </tr>
	<?php endforeach;?>
	<?php else:?>
	<tr>
		<td colspan="5" class="error">
		暂无分类，请<?php echo link_to1('添加','category/create');?>
		</td>
    </tr>
	<?php endif;?>
    </table>
	<div id="cListTarget" class="cListTarget">
			
	</div>
	</div>
